﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class ShopBonusGrantInfoConfig : EntityTypeConfiguration<ShopBonusGrantInfo>
    {
        public ShopBonusGrantInfoConfig()
        {
            ToTable("Himall_ShopBonusGrant");
            Property(item => item.BonusQR).HasColumnType("varchar").HasMaxLength(300);
            HasRequired(x => x.Himall_Members).WithMany(x => x.Himall_ShopBonusGrant).HasForeignKey(x => x.UserId);
            HasRequired(x => x.Himall_ShopBonus).WithMany(x => x.Himall_ShopBonusGrant).HasForeignKey(x => x.ShopBonusId);
        }
    }
}
